import { Form, DatePicker } from 'antd';
import { ProFormText } from '@ant-design/pro-form';
import React from 'react';
import locale from 'antd/es/date-picker/locale/zh_CN';
import 'moment/locale/zh-cn'
import dayjs from 'dayjs';
import {LocalFormat} from "@/utils/localHelper";

const watcherFormItem: React.FC = () => (
  <div>
    <Form.Item
      label="值班日期"
      name="watchDate"
      rules={[
        {
          required: true,
          message: '值班日期必填',
        },
      ]}
    >
      <DatePicker format="YYYY-MM-DD" locale={locale}/>
    </Form.Item>

    <ProFormText
      rules={[
        {
          required: true,
          message: '值班领导名字必填',
        },
      ]}
      width="md"
      name="watchLeader"
      placeholder="请填写值班领导"
      label="值班领导"
    />
    <ProFormText
      rules={[
        {
          required: true,
          message: '主班处长名字必填',
        },
      ]}
      width="md"
      name="watchHead"
      placeholder="请填写主班处长"
      label="主班处长"
    />
    <ProFormText
      rules={[
        {
          required: true,
          message: '责任单位名字必填',
        },
      ]}
      width="md"
      name="watchReplaceHead"
      placeholder="请填写责任单位"
      label="责任单位"
    />
    <ProFormText
      rules={[
        {
          required: true,
          message: '车队值班员名字必填',
        },
      ]}
      width="md"
      name="convoyWatchers"
      placeholder="请填写车队值班员"
      label="车队值班员"
    />

    <ProFormText
      rules={[
        {
          required: true,
          message: '值班员必填',
        },
      ]}
      width="md"
      name="watchMan"
      placeholder="请填写值班员"
      label="值班员"
    />


  </div>
);

export default watcherFormItem;
